package com.googlecode.slm.domain.dao;

import java.io.Serializable;

/**
 * 
CREATE TABLE `t_tree` (
  `id` int(11) NOT NULL auto_increment COMMENT '节点ID',
  `pid` int(11) default NULL COMMENT '节点父ID',
  `name` varchar(255) default NULL COMMENT '节点名称',
  `leafage` int(11) default '0' COMMENT '1表示功能叶子0表示功能模块',
  `url` varchar(255) default NULL COMMENT '请求URL',
  `classname` varchar(255) default '' COMMENT '加载类名(当节点功能是1)',
  `description` varchar(655) default '' COMMENT '描述',
  `availability` int(11) default '1' COMMENT '是不有效(1-有效,2-无效)',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `name` (`name`),
  KEY `classname` (`classname`)
) ;

 * User: liguangjian
 * Date: 11-10-8
 * Time: 下午6:42
 * To change this template use File | Settings | File Templates.
 */
public class Tree implements Serializable{

    /**
	 * 
	 */
	private static final long serialVersionUID = -6872929239254643225L;

	private int id;

    private int pid;

    private String name;

    private int leafage;

    private String url;

    private String classname;
    
    private String description;
    
    private int availability;
    
    public Tree() {
    }

    public Tree(int id, int pid, String name, int leafage, String url,
			String classname, String description, int availability) {
		super();
		this.id = id;
		this.pid = pid;
		this.name = name;
		this.leafage = leafage;
		this.url = url;
		this.classname = classname;
		this.description = description;
		this.availability = availability;
	}

	public Tree(int id, int pid, String name, int leafage, String url) {
        this.id = id;
        this.pid = pid;
        this.name = name;
        this.leafage = leafage;
        this.url = url;
    }

    public int getId() {
        return id;
    }
    

    public String getClassname() {
		return classname;
	}

	public void setClassname(String classname) {
		this.classname = classname;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public int getAvailability() {
		return availability;
	}

	public void setAvailability(int availability) {
		this.availability = availability;
	}

	public void setId(int id) {
        this.id = id;
    }

    public int getPid() {
        return pid;
    }

    public void setPid(int pid) {
        this.pid = pid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getLeafage() {
        return leafage;
    }

    public void setLeafage(int leafage) {
        this.leafage = leafage;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }
}
